<?php
class server extends CI_Controller{
	
	function __construct()
	{
		require_once BASEPATH.'nusoap/lib/nusoap.php';
	}
	
	function json(){
		$arr = array();
		$arr["name"] = "manhnv";
		$arr["email"] = "manhnv85@gmail.com";
		die(json_encode($arr));
	}
	
	function index()
	{
		// Create the client instance
		$client = new nusoap_client("http://demo.dev/ci/index.php/welcome/wsdl",
				false); // false: no WSDL
		// Call the SOAP method
		/*
		 $result = $client->call("HelloWorld",
		 		array("name" => "abc"));
		print_r($result) ;
		*/
		
		$result = $client->call("HelloComplexWorld",
				array("name" => array("ID" => 1, "YourName" => "aaaaaaa")));
		print_r($result) ;
		
		$result = $client->call("HelloWorld",
				array("name" => "abc"));
		print_r($result) ;
		
		$result = $client->call("login",
				array("strUserName" => "abc", "strPassWord" => "123456"));
		print_r($result) ;
	}
}